import request from '@/utils/request'

// 获取水厂下拉列表
export function getFactoryList() {
  return request({
    url: '/operation/web/operationWaterPlantDashboard/factoryList',
    method: 'get'
  })
}

// 获取水厂指标类型下拉列表
export function getWaterPlantKpiTypeList() {
  return request({
    url: '/operation/web/operationWaterPlantDashboard/waterPlantKpiType',
    method: 'get'
  })
}

// 获取组态类型下拉列表
export function getConfigurationTypeList() {
  return request({
    url: '/operation/web/operationWaterPlantDashboard/configurationType',
    method: 'get'
  })
}

// 查询水厂驾驶舱配置列表
export function getWaterPlantConfigList(params) {
  return request({
    url: '/operation/web/operationWaterPlantDashboard/list',
    method: 'get',
    params
  })
}

// 获取水厂驾驶舱配置详细信息
export function getWaterPlantConfigDetail(configurationId) {
  return request({
    url: `/operation/web/operationWaterPlantDashboard/${configurationId}`,
    method: 'get'
  })
}

// 新增水厂驾驶舱配置
export function addWaterPlantConfig(data) {
  return request({
    url: '/operation/web/operationWaterPlantDashboard',
    method: 'post',
    data
  })
}

// 修改水厂驾驶舱配置
export function updateWaterPlantConfig(data) {
  return request({
    url: '/operation/web/operationWaterPlantDashboard',
    method: 'put',
    data
  })
}

// 删除水厂驾驶舱配置
export function deleteWaterPlantConfig(configurationIds) {
  return request({
    url: `/operation/web/operationWaterPlantDashboard/${configurationIds}`,
    method: 'delete'
  })
}